package jpsearchcore;

public class RightsDescription {
	
	private String RightsDescriptionInformation = null;
	private String Description = null;
	private String ActualRightsDescriptionReference = null;
	private String ActualRightsDescription = null;
	
	public RightsDescription(){}
	
	public RightsDescription(String rdi, String d, String ardr, String ard){
		RightsDescriptionInformation = rdi;
		Description = d;
		ActualRightsDescriptionReference = ardr;
		ActualRightsDescription = ard;
	}
	
	public RightsDescription(RightsDescriptionType r){
		
		try{
			RightsDescriptionInformation = r.getRightsDescriptionInformation().trim();
		}
		catch(NullPointerException e){}
		/////
		try{
			Description = r.getDescription().trim();
		}
		catch(NullPointerException e){}
		///////
		try{
			ActualRightsDescriptionReference = r.getActualRightsDescriptionReference().trim();
		}
		catch(NullPointerException e){}
		////////
		try{
			ActualRightsDescription = r.getActualRightsDescription().trim();
		}
		catch(NullPointerException e){}
	}
	
	public String getRightsDescriptionInformation() {
		return RightsDescriptionInformation;
	}

	public String getDescription() {
		return Description;
	}

	public String getActualRightsDescriptionReference() {
		return ActualRightsDescriptionReference;
	}

	public String getActualRightsDescription() {
		return ActualRightsDescription;
	}
	
	
	public void setRightsDescriptionInformation(String rightsDescriptionInformation) {
		RightsDescriptionInformation = rightsDescriptionInformation;
	}

	public void setDescription(String description) {
		Description = description;
	}

	public void setActualRightsDescriptionReference(
			String actualRightsDescriptionReference) {
		ActualRightsDescriptionReference = actualRightsDescriptionReference;
	}

	public void setActualRightsDescription(String actualRightsDescription) {
		ActualRightsDescription = actualRightsDescription;
	}

	public String toString(){
		String output = "RightsDescription:[";
		output += "\n\tRightsDescriptionInformation: " + RightsDescriptionInformation;
		output += "\n\tDescription: " + Description;
		output += "\n\tActualRightsDescriptionReference: " + ActualRightsDescriptionReference;
		output += "\n\tActualRightsDescription: " + ActualRightsDescription;
		output += "\n]";
		return output;
	}
}
